Conditions | 1 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | |||
5 | function isEmpty(x) { |
||
6 | return ( |
||
7 | typeof x === 'undefined' || |
||
8 | x === null || |
||
9 | x === 'null' || |
||
10 | x === 'undefined' || |
||
11 | x === false || |
||
12 | x.length === 0 || |
||
13 | x === ''|| |
||
14 | (x === "object" && Object.key(x).length === 0) || |
||
15 | (x && Object.keys(x).length === 0 |
||
16 | && Object.getPrototypeOf(x) === Object.prototype) |
||
17 | ); |
||
18 | } |
||
19 | |||
65 | }; |